<template>
  <div>
    <head-view />
    <router-view></router-view>
    <footer-view v-show="$route.meta.isShow" />
  </div>
</template>

<script>
import headView from "./components/Head/index.vue";
import footerView from "@/components/Footer/index.vue";
export default {
  name: "App",
  components: { headView, footerView },
  
  mounted() {
    //列表请求只需要一次，mounted也只执行一次
    this.$store.dispatch("home/getCategoryList"); //开启命名空间后的写法
  },
};
</script>